<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
	<base href="<%=basePath%>">
	<!-- jsp文件头和头部 -->
	<%@ include file="../../system/main/main_top.jsp"%> 
	</head> 
<body>
<div class="container-fluid" id="main-container">
<div id="breadcrumbs">
	<ul class="breadcrumb">
		<li><i class="icon-home"></i> <a>系统管理</a> <span class="divider">
				<i class="icon-angle-right"></i>
		</span></li>
		<li class="active">意见反馈</li>
	</ul>
	<!--.breadcrumb-->
</div>
<div id="page-content" class="clearfix">
  <div class="row-fluid">
	<div class="row-fluid">
			<!-- 检索  -->
			<form action="appFeedback/list.do" method="post" name="Form" id="Form">
			<table>
				<tr>
					<td><input class="span10 date-picker" id="lastStart" name="lastStart" value="${pageData.lastStartShow}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:100px;" placeholder="提交日期从"/></td>
					<td><input class="span10 date-picker" id="lastEnd" name="lastEnd" value="${pageData.lastEndShow}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:100px;" placeholder="提交日期至"/></td>
					<td style="vertical-align:top;">
						<select class="chzn-select" name="deal_status" data-placeholder="处理状态" style="vertical-align:top;width: 100px;">
							<option value="">全部</option>
							<option value="1" <c:if test="${pageData.deal_status == '1' }">selected</c:if> >已处理</option>
							<option value="0" <c:if test="${pageData.deal_status == '0' }">selected</c:if> >未处理</option>
						</select>
					</td>
					<td style="vertical-align:top;"><button class="btn btn-mini btn-light" onclick="search();"  title="检索"><i id="nav-search-icon" class="icon-search"></i></button></td>
				</tr>
			</table>
			<!-- 检索  -->
		
			<table id="table_report" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>反馈用户</th>
						<th>设备信息</th>
						<th>建议内容</th>
						<th>回复内容</th>
						<th>备注信息</th>
						<th>处理情况</th>
						<th>提交时间</th>
						<th class="center">操作</th>
					</tr>
				</thead>
										
				<tbody>
					
				<!-- 开始循环 -->	
				<c:choose>
					<c:when test="${not empty varList}">
						<c:forEach items="${varList}" var="var" varStatus="vs">
							<tr>
									<td>${var.username}</td>
									<td>${var.device_info}</td>
									<td>${var.content}</td>
									<td>${var.response_content}</td>
									<td>${var.remark}</td>
									<td>
										<c:if test="${var.deal_status == '0' }"><span class="label label-important arrowed-in">未处理</span></c:if>
										<c:if test="${var.deal_status == '1' }"><span class="label label-success arrowed">已处理</span></c:if>
									</td>
									<td><fmt:formatDate value="${var.create_time}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
									<td style="width: 60px;" class="center">
										<div class='hidden-phone visible-desktop btn-group'>
											<a class='btn btn-mini btn-info' title="查看" onclick="view('${var.id}');"><i class='icon-eye-open'></i></a>
											<a class='btn btn-mini btn-info' title="编辑" onclick="edit('${var.id}');"><i class='icon-edit'></i></a>
										</div>
									</td>
							</tr>
						</c:forEach>
						<!-- 
						<tr>
							<td colspan="100" class="center">您无权查看</td>
						</tr>
						 -->
					</c:when>
					<c:otherwise>
						<tr class="main_info">
							<td colspan="100" class="center" >没有相关数据</td>
						</tr>
					</c:otherwise>
				</c:choose>
				</tbody>
			</table>
			
			<div class="page-header position-relative">
				<table style="width:100%;">
					<tr>
						<td style="vertical-align:top;">
							<!-- <a class="btn btn-small btn-success" onclick="view(1);">查看</a> -->
						</td>
						<td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
					</tr>
				</table>
			</div>
		</form>
	</div>
 
	<!-- PAGE CONTENT ENDS HERE -->
  </div><!--/row-->
	
</div><!--/#page-content-->
</div><!--/.fluid-container#main-container-->
		
		<!-- 返回顶部  -->
		<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse">
			<i class="icon-double-angle-up icon-only"></i>
		</a>
		
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="static/js/ace-elements.min.js"></script>
		<script type="text/javascript" src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 单选框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript" src="static/js/bootbox.min.js"></script><!-- 确认窗口 -->
		<!-- 引入 -->
		
		<script type="text/javascript">
		
		$(top.hangge());
		
		//检索
		function search(){
			top.jzts();
			$("#Form").submit();
		}
		
		//查看
		function view(feedback_id){
			 top.jzts();
			 var diag = new top.Dialog();
			 diag.Drag=true;
			 diag.Title ="查看";
			 diag.URL = '<%=basePath%>/appFeedback/goView.do?feedback_id='+feedback_id;
			 diag.Width = 860;
			 diag.Height = 600;
			 diag.CancelEvent = function(){ //关闭事件
				 if(diag.innerFrame.contentWindow.document.getElementById('centerOfMainFrame').style.display == 'none'){
					 nextPage(${page.currentPage});
				}
				diag.close();
			 };
			 diag.show();
		}
		
		//修改
		function edit(feedback_id){
			top.jzts();
			 var diag = new top.Dialog();
			 diag.Drag=true;
			 diag.Title ="编辑";
			 diag.URL = '<%=basePath%>appFeedback/goEditFeedback.do?feedback_id='+feedback_id;
			 diag.Width = 500;
			 diag.Height = 550;
			 diag.CancelEvent = function(){ //关闭事件
				 if(diag.innerFrame.contentWindow.document.getElementById('centerOfMainFrame').style.display == 'none'){
					 nextPage(${page.currentPage});
				}
				diag.close();
			 };
			 diag.show();
		}
		</script>
		
        <script type="text/javascript">
		$(function() {
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			//日期框
			$('.date-picker').datepicker();
		});
		</script>
	</body>
</html>

